<?php 
	$uri = $this->uri->segment(1); 
	$all_session = $this->session->all_userdata();
?>

<ul class="sidebar-nav">
  <li class="sidebar-brand"><a href="#">Control Panel</a> </li>
  <li <?php if($uri == 'panel') { echo 'class="bg-primary"';} ?>><a href="<?php echo base_url();?>index.php/panel"><span class="glyphicon glyphicon-th-large" <?php if($uri == 'panel') { echo 'style ="display: inline-block;"
';} ?>></span>&nbsp;Dashboard</a></li>
  <?php if($all_session['login'][0]['mem_type'] == 2) { ?>
  <li  <?php if($uri == 'pslide') { echo 'class="bg-primary"';} ?>><a href="<?php echo base_url();?>index.php/pslide"><span class="glyphicon glyphicon-expand" <?php if($uri == 'pslide') { echo 'style ="display: inline-block;"
';} ?>></span>&nbsp;Slide</a></li>

<?php if($uri == 'pslide') { ?>
<ul class="sidebar-sec">
<li><a href="<?php echo base_url();?>index.php/pslide/set_event">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Setting Slides</a></li>
</ul>
<?php } ?>
  <?php } ?>
  <?php if($all_session['login'][0]['mem_type'] == 2) { ?>
  <li <?php if($uri == 'pmember') { echo 'class="bg-primary"';} ?>><a href="<?php echo base_url();?>index.php/pmember"><span class="glyphicon glyphicon-user" <?php if($uri == 'pmember') { echo 'style ="display: inline-block;"
';} ?>></span>&nbsp;Members</a></li>
  <?php if($uri == 'pmember') { echo '
	<ul class="sidebar-sec">
    	<li><a href='.base_url().'index.php/pmember>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;All Members</a></li>
        <li><a href='.base_url().'index.php/pmember/register>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add Member</a></li>
		<li><a href='.base_url().'index.php/pmember/profile>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Member Profile</a></li>
		<li><a href='.base_url().'index.php/pmember/update>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Update Profile</a></li>
    </ul>
	';}
	?>
  <?php } ?>
  
  
   <li <?php if($uri == 'pvdo') { echo 'class="bg-primary"';} ?>><a href="<?php echo base_url();?>index.php/pvdo"><span class="glyphicon glyphicon-film"<?php if($uri == 'pvdo') { echo 'style ="display: inline-block;"
';} ?>></span> Videos </a> </li>
  

  <?php if($uri == 'pvdo') { ?>
  <ul class="sidebar-sec">
  
  
  	  <li><a href="<?php echo base_url();?>index.php/pvdo/approve">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;New Videos
<span class="badge">
<?php	
	if($all_session['login'][0]['mem_type'] == 1) {			
		$this->db->where('mem_id' ,$all_session['login'][0]['mem_id']);
	} 
	$this->db->where('vdo_status',null);
	
	$query = $this->db->get('vdo');
	$feed = count($query->result_array());
?>
<?php echo $feed; ?>
</span></a> </li>
  
  
    <li><a href="<?php echo base_url(); ?>index.php/pvdo/upload">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Upload</a></li>
    <?php if($all_session['login'][0]['mem_type'] == 2) { ?>
    <li><a href="<?php echo base_url(); ?>index.php/pvdo/category">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Category</a></li>
    <?php } ?>
  </ul>
  <?php } ?>
    <?php if($all_session['login'][0]['mem_type'] == 2) { ?>
  <li <?php if($uri == 'preport') { echo 'class="bg-primary"';} ?>><a href="<?php echo base_url();?>index.php/preport"><span class="glyphicon glyphicon-envelope"<?php if($uri == 'preport') { echo 'style ="display: inline-block;"
';} ?>></span>&nbsp;Report</a> </li>
<?php } ?>
  <?php if($all_session['login'][0]['mem_type'] == 2) { ?>
  <li <?php if($uri == 'plogfile') { echo 'class="bg-primary"';} ?>><a href="<?php echo base_url();?>index.php/plogfile"><span class="glyphicon glyphicon-file"<?php if($uri == 'logfile') { echo 'style ="display: inline-block;"
';} ?>></span>&nbsp;Log file</a> </li>
  <li <?php if($uri == 'psetting') { echo 'class="bg-primary"';} ?>><a href="<?php echo base_url();?>index.php/psetting"><span class="glyphicon glyphicon-cog	"<?php if($uri == 'setting') { echo 'style ="display: inline-block;"
';} ?>></span>&nbsp;Setting</a> </li>
  <?php } ?>
  <li><a href="<?php echo base_url();?>index.php/authen/logout"><span class="glyphicon glyphicon-lock	"<?php if($uri == 'setting') { echo 'style ="display: inline-block;"
';} ?>></span>&nbsp;Sign out</a> </li>
</ul>


